package BaseObject.homework;

/**
 * @author Raymond
 * @create 2025/3/13 10:20
 */
public class Homework03 {
    public static void main(String[] args) {
        Book book = new Book();
        int i = book.updatePrice(99);
        System.out.println("i = " + i);
    }
}


class Book {
    public int updatePrice(int price) {
        if (price > 150) {
            price = 150;
            return price;
        } else if (price > 100) {
            price = 100;
            return price;
        } else {
            return price;
        }
    }
}